package com.yzg.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* @Author: decade
* @Description: ${description}
* @Date: 2021/1/14 20:49
**/
/**
    * 权限
    */
@ApiModel(value="com-yzg-pojo-Permission")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "acl_permission")
public class Permission implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value="编号")
    private String id;

    /**
     * 所属上级
     */
    @TableField(value = "pid")
    @ApiModelProperty(value="所属上级")
    private String pid;

    /**
     * 名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value="名称")
    private String name;

    /**
     * 类型(1:菜单,2:按钮)
     */
    @TableField(value = "type")
    @ApiModelProperty(value="类型(1:菜单,2:按钮)")
    private Byte type;

    /**
     * 权限值
     */
    @TableField(value = "permission_value")
    @ApiModelProperty(value="权限值")
    private String permissionValue;

    /**
     * 访问路径
     */
    @TableField(value = "path")
    @ApiModelProperty(value="访问路径")
    private String path;

    /**
     * 组件路径
     */
    @TableField(value = "component")
    @ApiModelProperty(value="组件路径")
    private String component;

    /**
     * 图标
     */
    @TableField(value = "icon")
    @ApiModelProperty(value="图标")
    private String icon;

    /**
     * 状态(0:禁止,1:正常)
     */
    @TableField(value = "status")
    @ApiModelProperty(value="状态(0:禁止,1:正常)")
    private Byte status;

    @ApiModelProperty(value = "层级")
    @TableField(exist = false)
    private Integer level;

    @ApiModelProperty(value = "下级")
    @TableField(exist = false)
    private List<Permission> children;

    @ApiModelProperty(value = "是否选中")
    @TableField(exist = false)
    private boolean isSelect;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value="逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Boolean deleted;

    /**
     * 创建时间
     */
    @TableField(value = "add_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date addTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PID = "pid";

    public static final String COL_NAME = "name";

    public static final String COL_TYPE = "type";

    public static final String COL_PERMISSION_VALUE = "permission_value";

    public static final String COL_PATH = "path";

    public static final String COL_COMPONENT = "component";

    public static final String COL_ICON = "icon";

    public static final String COL_STATUS = "status";

    public static final String COL_DELETED = "deleted";

    public static final String COL_ADD_TIME = "add_time";

    public static final String COL_UPDATE_TIME = "update_time";
}